import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue' // 导入 Home.vue 组件
import OrderShow from "@/views/OrderShow.vue";
import ServicePage1 from "@/views/ServicePage1.vue";
import ServicePage2 from "@/views/ServicePage2.vue";
import ServicePage3 from "@/views/ServicePage3.vue";
import ServicePage4 from "@/views/ServicePage4.vue";
import Address from "@/views/Address.vue"
import Faq from "@/views/Faq.vue"
import FormPayView from "@/views/FormPayView.vue";
import ServicePage5 from "@/views/ServicePage5.vue";
import ServicePage6 from "@/views/ServicePage6.vue";
import ServicePage0 from "@/views/ServicePage0.vue";
import ServiceDetails from "@/views/ServiceDetails.vue";
import AddressForm from "@/views/AddressForm.vue";
import Form_Pay from "@/components/Form_Pay.vue";
import ServiceListHome from "@/views/ServiceListHome.vue";
const routes = [



]

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/payform', // 动态路由参数
            name: 'Form_Pay',
            component: Form_Pay // 对应的组件
        },
        {
            path: '/',
            name: 'Home',

            component: Home // 将 Home.vue 设为默认页面
        },
        {
            path: '/addAddress',
            name: 'AddressForm',

            component: AddressForm // 将 Home.vue 设为默认页面
        },



        {
            path: '/service/details/:id', // :id 表示动态参数
            name: 'ServiceDetails',
            component: () => import('../views/ServiceDetails.vue')
        },
        {
            path: '/order',
            name: 'OrderShow',
            component: OrderShow
        } ,




        {
            path: '/address',
            name: 'Address',
            component: Address // 将 Home.vue 设为默认页面
        }

        ,
        {
            path: '/faq',
            name: 'Faq',
            component: Faq// 将 Home.vue 设为默认页面
        }

        ,
        {
            path: '/order',
            name: 'OrderShow',
            component: OrderShow
        },
        {
            path: '/service1',
            name: 'ServiceNoParam',
            component:ServicePage1 // 不带参数页面
        },
        {
            path: '/service1/:id',
            name: 'ServiceWithParam',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service2',
            name: 'ServicePage2',
            component: ServicePage2
        }
        ,
        {
            path: '/service2/:id',
            name: 'ServiceWithParam2',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service3',
            name: 'ServicePage3',
            component: ServicePage3
        }
        ,
        {
            path: '/service3/:id',
            name: 'ServiceWithParam3',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service4',
            name: 'ServicePage4',
            component: ServicePage4
        }
        ,
        {
            path: '/service4/:id',
            name: 'ServiceWithParam4',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service5',
            name: 'ServicePage5',
            component: ServicePage5
        },

        {
            path: '/service5/:id',
            name: 'ServiceWithParam5',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service6',
            name: 'ServicePage6',
            component: ServicePage6
        }
        ,
        {
            path: '/service6/:id',
            name: 'ServiceWithParam6',
            component: () => import('@/views/ServiceListHome.vue') // 带参数页面
        },
        {
            path: '/service0',
            name: 'ServicePage0',
            component: ServicePage0
        }
        ,{



            path: '/service/details/:id',
            name:'ServiceDetails',
            component: ServiceDetails
        }
        ]
})

export default router